﻿using Castle.Windsor;
using Castle.Windsor.Installer;
using DIBestPractice.ApplicationService.WindsorInstallers;
using DIBestPractice.Repository.WindsorInstallers;

namespace DIBestPractice.Application
{
    public class ApplicationBootstrap
    {
        public static IWindsorContainer Container { get; private set; }

        public static IWindsorContainer  RegisterComponents()
        {
            Container=new WindsorContainer();

            Container.Install(FromAssembly.This());
            Container.Install(FromAssembly.Containing<ApplicationServiceInstaller>());
            Container.Install(FromAssembly.Containing<RepositoryInstaller>());


            return Container;
        }
    }
}